#ifndef PREVIEWSCR_H
#define PREVIEWSCR_H

#include "global.h"
#include <QWidget>
#include <QMouseEvent>
#include <QAction>

class PreviewScr : public QWidget
{
    Q_OBJECT
public:
    explicit PreviewScr(QWidget *parent = 0, int num=0);
    PreviewScr(QWidget *parent, QWidget *scr, int num=0);
    QWidget *linkedScreen() {return screen;}
    int linkedScreenNumber() {return screenNum;}

protected:
    void paintEvent(QPaintEvent *);
    void init();

private:
    QWidget *screen;
    void focusInEvent(QFocusEvent *);
    void focusOutEvent(QFocusEvent *);
    int screenNum;

    QAction *actDrawImage;
    QAction *actShowClock;

signals:
    void drawImage(int num);
    void showClock(int num);

public slots:
    void sendDrawImage();
    void sendShowClock();

};

#endif // PREVIEWSCR_H
